// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */

// 用户管理
import user from '@/views/system/user';
// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';


// 图表界面
import WorkRecord from "@/views/work_record/WorkRecord";
import Incentive from "../views/incentive/Incentive";
import Salary from "../views/salary/Salary";
import PathVar from "../views/system/PathVar";

// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/salary',
            name: '工资管理',
            component: Salary,
            meta: {
                requireAuth: false
            }
        },{
            path: '/system/pathVar',
            name: '系统环境变量',
            component: PathVar,
            meta: {
                requireAuth: false
            }
        },{
            path: '/work_record',
            name: '考勤管理',
            component: WorkRecord,
            meta: {
                requireAuth: false
            }
        },{
            path: '/incentive',
            name: '奖惩管理',
            component: Incentive,
            meta: {
                requireAuth: false
            }
        }, {
            path: '/system/user',
            name: '用户管理',
            component: user,
            meta: {
                requireAuth: false
            }
        }, {
            path: '/system/Module',
            name: '菜单管理',
            component: Module,
            meta: {
                requireAuth: false
            }
        }, {
            path: '/system/Role',
            name: '角色管理',
            component: Role,
            meta: {
                requireAuth: false
            }
        }, {
            path: '/system/Dept',
            name: '部门管理',
            component: Dept,
            meta: {
                requireAuth: false
            }
        }]
    }]
})
